<div class="vehicles form">

<?php
$this->Html->script('prototype', array('inline' => false));
echo $this->Form->create('Vehicle');?>
	<fieldset>
		<legend><?php __('Agregar Vehiculo'); ?></legend>
	<?php   
//                echo $this->Form->input('Marca',array('empty'=>array($brands),'type'=>'select','selected'=>'0'));
//		echo $this->Form->input('models_id',array('label'=>'Modelo'));
        
             
                echo $form->inputs(array('legend'=>'',
                'Models.brands_id' => array('label'=> 'Marcas','showEmpty'=>'false','id'=>'brands'),
                'Vehicle.models_id' => array('label'=> 'Modelo','showEmpty'=>'false','id'=>'models'),
                        ));
      
		echo $this->Form->input('vehicles_types_id',array('label'=>'Tipo de Vehiculo'));
                echo $this->Form->input('extranjero',array('label'=>'Es Extranjero','empty'=>array('0'=>'No','1'=>'Si'),'type'=>'select','selected'=>'0'));
		echo $this->Form->input('dom_parcial',array('label'=>'Dominio Completo','empty'=>array('0'=>'No','1'=>'Si'),'type'=>'select','selected'=>'0'));
		echo $this->Form->input('motor_parc',array('label'=>'Motor Completo','empty'=>array('0'=>'No','1'=>'Si'),'type'=>'select','selected'=>'0'));
                echo $this->Form->input('chasis_parc',array('label'=>'Chasis Completo','empty'=>array('0'=>'No','1'=>'Si'),'type'=>'select','selected'=>'0'));
		echo $this->Form->input('rodamiento',array('label'=>'Rodamiento','empty'=>array('0'=>'No Apto','1'=>'Apto'),'type'=>'select','selected'=>'0'));
		echo $this->Form->input('observaciones');
		echo $this->Form->input('dominio');
		echo $this->Form->input('nro_motor');
		echo $this->Form->input('nro_chasis');
	?>
	</fieldset>
<?php echo $this->Form->end(__('Guardar', true));
$options = array('url' => 'update_select','update' => 'models');
echo $ajax->observeField('brands',$options);
?>
</div>
<div class="actions">
	<h3><?php __('Acciones'); ?></h3>
	<ul>

		<li><?php echo $this->Html->link(__('Listar Vehiculos', true), array('action' => 'index'));?></li>
		<li><?php echo $this->Html->link(__('Listar Modelos', true), array('controller' => 'models', 'action' => 'index')); ?> </li>
		<li><?php echo $this->Html->link(__('Nuevo Modelo', true), array('controller' => 'models', 'action' => 'add')); ?> </li>
		<li><?php echo $this->Html->link(__('Listar Tipos de Vehiculos', true), array('controller' => 'vehicles_types', 'action' => 'index')); ?> </li>
		<li><?php echo $this->Html->link(__('Nuevo Tipo de Vehiculo', true), array('controller' => 'vehicles_types', 'action' => 'add')); ?> </li>
	</ul>
</div>